import urllib.request as ul

ret = ul.urlopen('https://edu.csdn.net/').read()
with open('ret.html', 'wb') as f:
    f.write(ret)